Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SampleD with a non-spherical Gaussian convolution matrix (with standard base and center 0) #407

Merged
merged 6 commits into from
Sep 27, 2024

Conversation

Marvin-Beckmann
Copy link
Member

@Marvin-Beckmann Marvin-Beckmann commented Sep 2, 2024

Description

This PR implements...

  • SampleD with a non-spherical Gaussian convolution matrix (with standard base and center 0)

I decided to only implement the common version for now, as the more general version requires more extensive testing and as of right now, I only need the common version.

The PR is based on Algorithm 1 from https://link.springer.com/chapter/10.1007/978-3-642-14623-7_5.

Testing

  • I added basic working examples (possibly in doc-comment)
  • I triggered all possible errors in my test in every possible way
  • I included tests for all reasonable edge cases

Checklist:

  • I have performed a self-review of my own code
    • The code provides good readability and maintainability s.t. it fulfills best practices like talking code, modularity, ...
      • The chosen implementation is not more complex than it has to be
    • My code should work as intended and no side effects occur (e.g. memory leaks)
    • The doc comments fit our style guide
    • I have credited related sources if needed

@Marvin-Beckmann Marvin-Beckmann added the enhancement📈 New feature label Sep 2, 2024
@Marvin-Beckmann Marvin-Beckmann self-assigned this Sep 2, 2024
Copy link
Member

@jnsiemer jnsiemer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider the proposed changes - especially regarding panics and errors.
Otherwise, great work! I won't trace every call back but this algorithm should work as expected.

src/integer/mat_z/sample/discrete_gauss.rs Outdated Show resolved Hide resolved
src/integer/mat_z/sample/discrete_gauss.rs Outdated Show resolved Hide resolved
src/integer/mat_z/sample/discrete_gauss.rs Outdated Show resolved Hide resolved
src/integer/mat_z/sample/discrete_gauss.rs Outdated Show resolved Hide resolved
@Marvin-Beckmann Marvin-Beckmann merged commit 01e6aaf into dev Sep 27, 2024
2 checks passed
@Marvin-Beckmann Marvin-Beckmann deleted the sampleD_common_non_spherical branch September 27, 2024 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement📈 New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants